Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wait for EEFC flash to complete operations before reseting #111

Closed
wants to merge 1 commit into from

Conversation

Lohrer
Copy link

@Lohrer Lohrer commented Oct 19, 2019

For an Arduino Due with EEFC flash, setting the boot flash bit doesn't complete before a reset is performed. This makes it impossible to get the SAM device out of bootloader mode. Adding a simple check that flash operations are done after committing them fixes the issue.

Note, to program my Due from Ubuntu also requires #78 to get the 1200 baud reset working.

@shumatech
Copy link
Owner

The paradigm in the Flash classes is to wait for completion before performing the next operation to better pipeline commands. If there is a dependency that all flash operations must be complete prior to execution of a reset, then that dependency should be handled at a higher level. For example, change bossa.c to:

if (config.reset) {
// Ensure flash operation are complete prior to reset
flash->ready();
device.reset();
}

You'll need to add the ready() method to the Flash base class and implement it in each concrete class.

@Lohrer
Copy link
Author

Lohrer commented Aug 17, 2021

Closing this PR in favor of #151 which implements the correct Flash paradigm, as suggested above by @shumatech.

@Lohrer Lohrer closed this Aug 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants